local skel = fk.CreateSkill {
  name = "emo__fengchui",
}

Fk:loadTranslationTable{
  ["emo__fengchui"] = "风锤",
  [":emo__fengchui"] = "每回合限一次，你可以视为使用或打出一张无距离限制的【杀】。你每回合使用的第一张牌不可响应。",

  ["#emo__fengchui"] = "风锤：你可以视为使用或打出一张无距离限制的【杀】",

  ["$emo__fengchui1"] = "风啊，飞舞吧！",
  ["$emo__fengchui2"] = "风王铁锤！",
}

skel:addEffect("viewas", {
  anim_type = "offensive",
  pattern = "slash",
  prompt = "#emo__fengchui",
  card_filter = Util.FalseFunc,
  view_as = function(self, player, cards)
    local c = Fk:cloneCard("slash")
    c.skillName = skel.name
    return c
  end,
  enabled_at_play = function(self, player)
    return player:usedEffectTimes(self.name, Player.HistoryTurn) == 0
  end,
  enabled_at_response = function (self, player, response)
    return player:usedEffectTimes(self.name, Player.HistoryTurn) == 0
  end,
  times = function (self, player)
    return 1 - player:usedEffectTimes(self.name, Player.HistoryTurn)
  end,
})

skel:addEffect(fk.CardUsing, {
  can_refresh = function (self, event, target, player, data)
    if target == player and player:hasSkill(skel.name) then
      local first = player.room.logic:getEventsOfScope(GameEvent.UseCard, 1, function(e)
        local use = e.data
        return use.from == player
      end, Player.HistoryTurn)[1]
      return first and first.data == data
    end
  end,
  on_refresh = function (self, event, target, player, data)
    local room = player.room
    data.disresponsiveList = table.simpleClone(room.players)
    room:notifySkillInvoked(player, skel.name, "offensive")
    if (data.card.is_damage_card or data.card:isCommonTrick()) and not table.contains(data.card.skillNames, skel.name) then
      player:broadcastSkillInvoke(skel.name)
    end
  end,
})

skel:addEffect("targetmod", {
  bypass_distances = function(self, player, skill, card)
    return card and table.contains(card.skillNames, skel.name)
  end,
})


return skel
